package com.zc.controller.zgq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 姓名：赵国庆
 * 时间：2021/6/23
 */
@RestController
public class ZgqController {
    @Autowired
    ZgqService zgqService;

    @RequestMapping("zgq/add")
    public void add(Student student){
        zgqService.addstudent(student);
    }

    @RequestMapping("zgq/delete")
    public void delete(Student student){
        zgqService.deletestudent(student);
    }

    @RequestMapping("zgq/update")
    public void update(Student student){
        zgqService.updatestudent(student);
    }

    @RequestMapping("zgq/list")
    public List<Map> list(){
        List<Map> list =zgqService.query();

        return list;
    }
}
